package model

import (
	"time"
)

type FollowProject struct {
	UserId     int64
	ProjectId  int64
	CreateTime time.Time `xorm:"created" form:"-"`
}

type SliceFollowProject []*FollowProject

func (sfp SliceFollowProject) GetProjectIds() []int64 {
	projectIds := []int64{}
	for _, v := range sfp {
		projectIds = append(projectIds, v.ProjectId)
	}

	return projectIds
}

func (sfp SliceFollowProject) GetUserIds() []int64 {
	userIds := []int64{}
	for _, v := range sfp {
		userIds = append(userIds, v.UserId)
	}

	return userIds
}
